package pers.cj.pdos.service;

import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import pers.cj.pdos.vo.RefundVo;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 退货单会将商品的状态置为待入库，需要仓库管理员进行入库操作 服务类
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface IRefundService extends IService<Refund> {
    List<RefundVo> listVo(String companyId,
                          Integer page,
                          Integer limit,
                          Boolean close,
                          String search,
                          String no,
                          String saleNo,
                          String goodsName,
                          String remark,
                          String storeId,
                          String houseId,
                          String settAccountId,
                          String custom,
                          Date makeTime1,
                          Date makeTime2,
                          String userStoreId,
                          String userId,
                          Date date1,
                          Date date2,
                          Date date,
                          String makeUserId,
                          String customId,
                          Integer status);

    long count(String companyId,
               Boolean close,
               String search,
               String no,
               String saleNo,
               String goodsName,
               String remark,
               String storeId,
               String houseId,
               String settAccountId,
               String custom,
               Date makeTime1,
               Date makeTime2,
               String userStoreId,
               String userId,
               Date date1,
               Date date2,
               Date date,
               String makeUserId,
               String customId,
               Integer status);

    RefundVo getVoById(String id);

    List<RefundVo> listVoByIds(List<String> ids);

    boolean checkNo(String no, String company_id);

    void insert(BusinessSet businessSet, Refund refund,
                List<RefundGoods> refundGoodsList, List<GoodsSn> goodsSnList,List<GoodsSnLog> goodsSnLogList,
                List<RefundPacket> refundPacketList, List<RefundPacketGoods> refundPacketGoodsList);

    void close(Refund refund);

    boolean checkClose(Refund refund);
}
